.TH "KDK_GSETTINGS_GET" 3 "Fri Sep 22 2023" "My Project" \" -*- nroff -*-
.ad l
.nh
.SH NAME
kdk_gsettings_get \- 获取gesettings指定key值  

.SH SYNOPSIS
.br
.PP
\fC#include <libkygsetting\&.h>\fP
.br

.SS "Functions"
.SS "void* kdk_gsettings_get (const char * schema_id, const char * key, const char * format,  \&.\&.\&.)"

.PP
获取gesettings指定key值 
.PP
\fBParameters\fP
.RS 4
\fIschema_id\fP schema中的id 
.br
\fIkey\fP key的名称 
.br
\fIformat\fP key 的类型，需要是 GVariant 支持的类型，除了可以使用基本的类型外，也可按照 GVariant 的方式组合类型 
.RE
.PP
\fBReturns\fP
.RS 4
GVariant key的值 
.RE
.PP
Link with \fI\-lkygsetting\fP.
.SH "Detailed Description"
.PP 
接口的主要功能是获取gesettings指定key值
.SH EXAMPLES
.EX
#include "libkygsetting.h"
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>

int main()
{
	int ret = kdk_settings_reset("org.gnome.evolution-data-server.calendar", "notify-custom-snooze-minutes");

	double a[] = {0.0,2.0};  
	size_t s = 2;
 	// double **s = a;
	
	ret = kdk_gsettings_set("org.onboard.window", "docking-aspect-change-range", "ad", a, s);	//当类型为数组时，请输入数组大小，size_t
	printf("%d\n", ret);
	ret = kdk_settings_set_string("org.gnome.evolution", "version", "3.36.1");
	ret = kdk_settings_set_int("org.ukui.audio", "output-volume", 67);
	char* res = kdk_settings_get_string("org.gnome.evolution", "version");
	printf("res = %s\n", res);

	int key = kdk_settings_get_int("org.ukui.audio", "output-volume");
	printf("key = %d\n", key);
	bool enabled;
	GVariantIter iter;
	kdk_gsettings_get("org.ukui.control-center.notice", "blacklist", "as", &iter);
	printf("enable = %d\n", enabled);
	// printf("value = %d\n", value);
	// for (int i = 0; value[i]; i++)
    // {
    //     printf("[%d]Get disk info error.\n", value[i]);
	// }

	double dde = kdk_settings_get_double("org.ukui.SettingsDaemon.plugins.xsettings", "scaling-factor");
	printf("dde = %0.1f\n", dde);
	return 0;
} 
.SH "CONFORMING TO"
These functions are as per the withdrawn POSIX.1e draft specification.
The following functions are Linux extensions:
.BR kdk_gsettings_set (),
.BR kdk_settings_reset (),
.BR kdk_settings_set_string (),
.BR kdk_settings_set_int (),
.BR kdk_settings_get_string (),
.BR kdk_settings_get_int ()
and
.BR kdk_settings_get_double ().
.SH "SEE ALSO"
.BR kdk_gsettings_set (3),
.BR kdk_settings_reset (3),
.BR kdk_settings_set_string (3),
.BR kdk_settings_set_int (3),
.BR kdk_settings_get_string (3),
.BR kdk_settings_get_int (3)
and
.BR kdk_settings_get_double (3).

.SH "Author"
.PP 
Generated automatically by Doxygen for libkygsetting.h from the source code\&.
